import request from "@/utils/request";

// 查询重点单位统计
export function gettypeList(data) {
  return request({
    url: "/system/drive/typeList",
    method: "post",
    data,
  });
}

// 查询检查记录统计
export function getcheckDtlList(data) {
  return request({
    url: "/system/drive/checkDtlList",
    method: "post",
    data,
  });
}

// 隐患已处置详情
export function getwarnCheckDtlList(data) {
  return request({
    url: "/system/drive/warnCheckDtlList",
    method: "post",
    data,
  });
}

// 隐患待处置详情
export function getwarnNoCheckDtlList(data) {
  return request({
    url: "/system/drive/warnNoCheckDtlList",
    method: "post",
    data,
  });
}

//省市-按累计检查排名-按隐患排名
export function getdriveArea(data) {
  return request({
    url: "/system/drive/driveArea",
    method: "post",
    data,
  });
}

//检查趋势
export function getcheckDirectList(data) {
  return request({
    url: "/system/drive/checkDirectList",
    method: "post",
    data,
  });
}

// 查询累计检查
export function getcheckList(data) {
  return request({
    url: "/system/drive/checkList",
    method: "post",
    data,
  });
}

// 查询隐患处置统计
export function getwarnList(data) {
  return request({
    url: "/system/drive/warnList",
    method: "post",
    data,
  });
}

// 查询待处置统计
export function getwarnNoCheckList(data) {
  return request({
    url: "/system/drive/warnNoCheckList",
    method: "post",
    data,
  });
}

// 单位-评分 绿色橙色红色
export function getdriveScore(data) {
  return request({
    url: "/system/drive/driveScore",
    method: "post",
    data,
  });
}

// 用户的位置
export function getuserPostion(data) {
  return request({
    url: "/system/drive/userPostion",
    method: "get",
    params: data,
  });
}

// 单位-评分 市获得区
export function getdriveScoreGetZone(data) {
  return request({
    url: "/system/drive/driveScoreGetZone",
    method: "post",
    data,
  });
}

// 单位-评分 市获得区
export function getdriveScoreGetStreet(data) {
  return request({
    url: "/system/drive/driveScoreGetStreet",
    method: "post",
    data,
  });
}

// 隐患轮播
export function getwranDtl(data) {
  return request({
    url: "/system/drive/warnDtl",
    method: "post",
    data,
  });
}

// 隐患轮播
export function getareacode(id) {
  return request({
    url: "/system/area/" + id,
    method: "get",
  });
}

/**
 * @description: 根据 adcode 获取对应的 市、区code
 * @param {*} id adcode
 */
export function getUrbanAreaCode(params) {
  return request({
    // url: "/drive/userArea",
    url: "/system/drive/userArea",
    method: "get",
    params,
  });
}
